﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace dbscript
{
    class Program
    {
        static void Main(string[] args)
        {
            Console.WriteLine("dbscript v" + System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString());
            Console.WriteLine("http://dbscript.codeplex.com/");
            Console.WriteLine();

            // A text file should be passed in as a command-line parameter

            if (args.Length != 1)
            {
                Console.WriteLine("Usage: dbscript filename");
                return;
            }

            Console.WriteLine("Script: " + args[0]);

            if (System.IO.File.Exists(args[0]))
                new clsDBScript().Run(args[0]);
            else
                Console.WriteLine("File not found.");
        }
    }
}
